<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

/**
 * Class ApiRequestPresetTable api接口请求预置参数表
 */
class ApiRequestPresetTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('api_request_preset', function (Blueprint $blueprint) {
            $blueprint->increments('preset_id')->comment('预置id');
            $blueprint->string('key')->comment('预置key名称');
            $blueprint->string('value')->comment('预置value值');
            $blueprint->string('part')->comment('数据提交位置(header,body)');
            $blueprint->unsignedInteger('project_id')->comment('所属项目id');
            $blueprint->softDeletes();
            $blueprint->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('api_request_preset');
    }
}
